﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 金蝶星瀚系统.KingDeeResponse;

namespace 金蝶星瀚系统.KingDeeRequest
{
    public class RequestRoot
    {
        public Request Request { get; set; }

        public RequestRoot(Object data)
        {
            this.Request = new Request();
            this.Request.Head = new Head();
            this.Request.Data = data;
        }
    }

    public class Request
    {
        /// <summary>
        /// 
        /// </summary>
        public Head Head { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Object Data { get; set; }
    }

    public class Head
    {
        /// <summary>
        /// 接口用途
        /// </summary>
        public string USE { get; set; }
        /// <summary>
        /// 调用此服务的系统标识
        /// </summary>
        public string CONSUMER { get; set; }
        /// <summary>
        /// 交易数量
        /// </summary>
        public string COUNT { get; set; }
        /// <summary>
        /// 服务级别
        /// </summary>
        public string SRVLEVEL { get; set; }
        /// <summary>
        /// 账户
        /// </summary>
        public string ACCOUNT { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string PASSWORD { get; set; }
        /// <summary>
        /// 事务ID编号
        /// </summary>
        public string BIZTRANSACTIONID { get; set; }
        /// <summary>
        /// 服务消费系统所在板块标识
        /// </summary>
        public string COMPANY { get; set; }
        /// <summary>
        /// 时间戳
        /// </summary>
        public string TIMESTAMP { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string COMMENTS { get; set; }
    }

    /// <summary>
    /// 箱号信息
    /// </summary>
    public class CartonInfo
    {
        /// <summary>
        /// 操作业务类型（A/新增，U/修改，D/删除/R作废）
        /// </summary>
        public string billStatus { set; get; }

        /// <summary>
        /// 业务类型
        /// </summary>
        public string businesstype { set; get; }

        /// <summary>
        /// 公司编码
        /// </summary>
        public string companyNo { set; get; }

        /// <summary>
        /// 业务日期（yyyy-MM-dd）
        /// </summary>
        public string bizDate { set; get; }

        /// <summary>
        /// 箱号
        /// </summary>
        public string number { set; get; }

        /// <summary>
        /// 包装箱号(暂无用处)
        /// </summary>
        public string packageBox { set; get; }

        /// <summary>
        /// 车号（非必填）
        /// </summary>
        public string carNo { set; get; }

        /// <summary>
        /// 定制料信息（非必填）
        /// </summary>
        public string cusMateInfo { set; get; }

        /// <summary>
        /// "生产线" （非必填）
        /// </summary>
        public string productLine { set; get; }

        /// <summary>
        /// 粒径
        /// </summary>
        public string partSize { set; get; }

        /// <summary>
        /// 料况
        /// </summary>
        public string materialConditionName { set; get; }

        /// <summary>
        /// 料况编码
        /// </summary>
        public string materialCondition { set; get; }

        /// <summary>
        /// 毛重
        /// </summary>
        public string gweight { set; get; }

        /// <summary>
        /// 净重
        /// </summary>
        public string nweight { set; get; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string material { set; get; }

        /// <summary>
        /// 生产批号
        /// </summary>
        public string proLotNo { set; get; }

        /// <summary>
        /// 包装批号
        /// </summary>
        public string packagelotNo { set; get; }

        /// <summary>
        /// 作废时传10，新增时不传
        /// </summary>
        public string enableFlage { set; get; }

        /// <summary>
        /// 作废人 作废时传输
        /// </summary>
        public string disableUser { set; get; }

        /// <summary>
        /// 来源系统(取消)
        /// </summary>
        //public string sourceSystem { set; get; }
    }


    public class PalletInfo
    {
        public Entry[] entries { get; set; }
        public string pallet { get; set; }
    }

    public class Entry
    {
        public string cartNo { get; set; }
        public Entry(string cartNo)
        {
            this.cartNo = cartNo;
        }
    }


    public class QueryCargo
    {
        /// <summary>
        /// 箱号
        /// </summary>
        public string cartNo { set; get; }

        /// <summary>
        /// 托号
        /// </summary>
        public string pallet { set; get; }
    }
}
